<?php
use Application\Model\vn3dUtil;
?>

<div class="panel panel-primary">
	<div class="panel-heading" style="height: 40px;">
		<span class="panel-title pull-left">Download products</span>
	</div>
	<div>

<?php
if($isSuccess){

?>
<div >
<hr>
<table class="table table-bordered">
      <thead>
        <tr>

          <th></th>
          <th></th>

        </tr>
      </thead>
      <tbody>



<!--      <tr> -->

<!--           <td>Token</td> -->
<!--           <td> -->
          <?php
//            echo $token;
           ?>
<!--           </td> -->
<!--         </tr> -->
<!--      <tr> -->

<!--           <td>PayerID</td> -->
<!--           <td> -->
          <?php
//           echo $payerid;
          ?>
<!--           </td> -->
<!--         </tr> -->
<!--      <tr> -->

          <td>Link</td>
          <td><?php echo vn3dUtil::DOMAIN;?>/store/download-product?securitycode=<?php echo $order->security_code;?></td>
        </tr>


         </tbody>
    </table>


</div>
<table class="table table-bordered">
      <thead>
        <tr>
          <th>#</th>
          <th>Name</th>
          <th>Download</th>

        </tr>
      </thead>
      <tbody>



<?php
$k=0;
    foreach ($cart as $key => $po) {

$k++;
    ?>
     <tr>
          <td ><?php echo $k;?></td>
          <td><a href="/store/download/<?php echo $po->id;?>/<?php echo vn3dUtil::convertUrlSeo($po->name);?>?securitycode=<?php echo $order->security_code?>" title="<?php echo $po->name;?>">
Download: <?php echo $po->name;?>
</a></td>
          <td><a href="/store/download/<?php echo $po->id;?>/<?php echo vn3dUtil::convertUrlSeo($po->name);?>?securitycode=<?php echo $order->security_code?>" title="<?php echo $po->name;?>">
<span class="glyphicon glyphicon-download" style="color: #428bca;font-size: 28px;"></span>
</a></td>
        </tr>


    <?php
    }

    ?>
     </tbody>
    </table>

    <?php
}else{
?>
<div style="background-color: gainsboro; height: 100px">
			<center style="padding-top: 50px">
				<span>Cart is empty</span>
			</center>
		</div>
<?php
}

?>

    	</div>
</div>